public class Teacher extends Person {
    private int salary;
    public Teacher(){}
    public Teacher( String name, String job, int salary) {
        super(name, job);
        this.salary = salary;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
    public void work(){
        System.out.println("姓名："+getName()+"，职位为："+getJob()+"，工资为："+getSalary());
    }
}
